<!-- 附件表 -->
<template>
  <div class="fcontainer">
    <el-table
      :data="tableData"
      height="calc(100% - 7rem)"
      border
      style="width: 40%; font-size: 14px"
    >
      <el-table-column label="序号" width="80">
        <template #default="scope">
          {{ scope.$index + 1 }}
        </template>
      </el-table-column>
      <el-table-column prop="name" label="附件名称" width="" />
      <el-table-column prop="attachments" label="查看附件" width="">
        <template #default="scope">
          <span
            class="text-overflow"
            @click="handleView(scope.$index, scope.row)"
            >{{ scope.row.attachments }}</span
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script setup name="attachmentTemplate">
const tableData = ref([
  {
    code: "110000769355935",
    name: "资产评估报告书",
    attachments: "1个附件",
  },
  {
    code: "110000769905140",
    name: "资产评估说明",
    attachments: "1个附件",
  },
  {
    code: "110000773350504",
    name: "资产评估明细表",
    attachments: "1个附件",
  },
  {
    code: "110000773350505",
    name: "经济行为批准文件",
    attachments: "3个附件",
  },
  {
    code: "110000773350506",
    name: "专项审计报告",
    attachments: "1个附件",
  },
  {
    code: "110000773350507",
    name: "其他附件",
    attachments: "无附件",
  },
]);
function handleView(index, row) {
  console.log(index, row);
}
</script>

<style scoped lang="scss">
.fcontainer {
  .text-overflow {
    color: rgb(94, 207, 255);
    cursor: pointer;
  }
}
</style>

